import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '后台方法',
    align: "center",
    dataIndex: 'method'
  },
  {
    title: '来源（人，部门）',
    align: "center",
    dataIndex: 'sourceId'
  },
  {
    title: '二维码文件名',
    align: "center",
    dataIndex: 'image'
  },
  {
    title: '二维码访问地址',
    align: "center",
    dataIndex: 'allUrl'
  },
  {
    title: '服务器地址',
    align: "center",
    dataIndex: 'dirUrl'
  },
  {
    title: '扫描次数',
    align: "center",
    dataIndex: 'qrCount'
  },
  {
    title: '是否有效',
    align: "center",
    dataIndex: 'isDel_dictText'
  },
];

//查询数据
export const searchFormSchema: FormSchema[] = [
];

//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '后台方法',
    field: 'method',
    component: 'Input',
  },
  {
    label: '来源（人，部门）',
    field: 'sourceId',
    component: 'Input',
  },
  {
    label: '二维码文件名',
    field: 'image',
    component: 'Input',
  },
  {
    label: '二维码访问地址',
    field: 'allUrl',
    component: 'Input',
  },
  {
    label: '服务器地址',
    field: 'dirUrl',
    component: 'Input',
  },
  {
    label: '扫描次数',
    field: 'qrCount',
    component: 'InputNumber',
  },
  {
    label: '是否有效',
    field: 'isDel',
    component: 'JDictSelectTag',
    componentProps:{
      dictCode: "del_flag"
    },
  },
	// TODO 主键隐藏字段，目前写死为ID
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false,
  },
];
